<?php

class Sc_User extends Sc_Domain
{
    protected $id;

    protected $username;

    protected $password;
    
    protected $isvalid;

    public function __construct($data = null)
    {
        if ($data != null) {
            if ($data instanceof Zend_Db_Table_Row_Abstract
                || is_array($data) == TRUE) {
                $this->id          = $this->getData($data, 'Id');
                $this->username  = $this->getData($data, 'Username');
                $this->password = $this->getData($data, 'Password');
                $this->isvalid = $this->getData($data, 'Isvalid');
            }
        }
    }

    public function toArray()
    {
        $data = array(
                'Id'          => $this->id,
                'Username'    => $this->username,
                'Password'    => $this->password,
        		'Isvalid'     => $this->isvalid
        );
        return $data;
    }
}